/*
 * @Author: LVGRAPE
 * @LastEditors: LVGRAPE
 */
#ifndef __IAP_PROTOCOL_H__
#define __IAP_PROTOCOL_H__
#include <stdint.h>
#include "bootloader.h"
int dev_sync(bl_info_t *bl);
int getVersion(bl_info_t *bl);
int getId(bl_info_t *bl);
int get_fwInfo(bl_info_t *bl);
int erase_flash(bl_info_t *bl, firmware_info_t *firmwareInfo);
int write_firmware(bl_info_t *bl, firmware_info_t *firmwareInfo, uint8_t *firmware_data);
int read_firmware(bl_info_t *bl, firmware_info_t *firmwareInfo, char *outFilename);
int write_fwInfo(bl_info_t *bl, firmware_info_t *firmwareInfo);
int reset(bl_info_t *bl);


#endif //__IAP_PROTOCOL_H__
